ifeq ($(KERNELRELEASE), )

KERNEL_ROOT = /mnt/vm/BiscuitOS/output/linux-5.0-arm32
KERNEL_DIR = $(KERNEL_ROOT)/linux/linux
#KERNEL_DIR = /lib/modules/4.15.0-48-generic/build

CROSS_COMPILE = $(KERNEL_ROOT)/arm-linux-gnueabi/gcc-linaro-7.4.1-2019.02-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-

CUR_DIR = $(shell pwd)
INCLUDEDIR=$(KERNEL_DIR)/include
ARCHINCLUDEDIR=$(KERNEL_DIR)/arch/arm/include

CFLAGS += -I$(INCLUDEDIR) -I$(ARCHINCLUDEDIR) 

all:
	make -C $(KERNEL_DIR) M=$(CUR_DIR) modules

clean:
	make -C $(KERNEL_DIR) M=$(CUR_DIR) clean
install:
	cp -raf *.ko $(KERNEL_DIR)/kmodules
else
obj-m += platform_override_dev.o
obj-m += platform_override_drv.o

endif

